import request from '@/utils/request'

export function smscode(data) {
  return request({
    url: '/api/v1/smscode',
    method: 'post',
    data
  })
}

export function login(data) {
  return request({
    url: '/api/v1/login',
    method: 'post',
    data
  })
}

export function reigster(data) {
  return request({
    url: '/api/v1/register',
    method: 'post',
    data
  })
}

export function resetPassword(data) {
  return request({
    url: '/api/v1/resetPassword',
    method: 'post',
    data
  })
}

export function refreshToken() {
  return request({
    url: '/api/v1/user/refreshToken',
    method: 'get'
  })
}

export function getInfo(data) {
  return request({
    url: '/api/v1/getUserInfo',
    method: 'post',
    data
  })
}

export function getButtons() {
  return request({
    url: '/api/v1/access/btnlist',
    method: 'get'
  })
}

export function getRoutes() {
  return request({
    url: '/api/v1/access/navlist',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
